﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;

namespace PcaWeb
{
    // Nota: para obtener instrucciones sobre cómo habilitar el modo clásico de IIS6 o IIS7, 
    // visite http://go.microsoft.com/?LinkId=9394801

    public class MvcApplication : System.Web.HttpApplication
    {
        protected void Application_AuthenticateRequest(object sender, System.EventArgs e)
        {
            // Skip authenticating all ext.axd embedded resources (.js, .css, images)
            if (HttpContext.Current.Request.FilePath.EndsWith("/ext.axd"))
            {
                HttpContext.Current.SkipAuthorization = true;
            }
        }
        
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();

            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            Log4netConfig.InitializeLog4Net();
            BundleConfig.RegisterBundles(BundleTable.Bundles);
        }
    }
}